package com.ml.mall.bean.req.tax;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
@ApiModel(value = "添加税相关信息")
@Accessors(chain = true)
public class TaxAddDto {
    @ApiModelProperty(value = "税名")
    @NotBlank(message = "税名不能为空")
    private String taxName;

    @ApiModelProperty(value = "税率")
    @NotNull(message = "税率不能为空")
    @DecimalMin(value = "0", message = "税率不可小于0%")
    @DecimalMax(value = "1", message = "税率不可大于100%")
    private BigDecimal taxRate;

    @ApiModelProperty(value = "启用状态，0禁用，1启用")
    @NotNull(message = "启用状态不能为空")
    private Integer state;
}
